package com.lakeworks.service.impl;

import com.lakeworks.domain.status.StaShipment;
import com.lakeworks.mapper.StaShipmentMapper;
import com.lakeworks.service.IStaShipmentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 出厂单状态Service业务层处理
 *
 * @author lake
 * @date 2023-02-23
 */
@Service
public class StaShipmentServiceImpl implements IStaShipmentService {
    @Autowired
    private StaShipmentMapper staShipmentMapper;

    /**
     * 查询出厂单状态
     *
     * @param id 出厂单状态主键
     * @return 出厂单状态
     */
    @Override
    public StaShipment selectStaShipmentById(Long id) {
        return staShipmentMapper.selectStaShipmentById(id);
    }

    /**
     * 查询出厂单状态列表
     *
     * @param staShipment 出厂单状态
     * @return 出厂单状态
     */
    @Override
    public List<StaShipment> selectStaShipmentList(StaShipment staShipment) {
        return staShipmentMapper.selectStaShipmentList(staShipment);
    }

    /**
     * 新增出厂单状态
     *
     * @param staShipment 出厂单状态
     * @return 结果
     */
    @Override
    public int insertStaShipment(StaShipment staShipment) {
        return staShipmentMapper.insertStaShipment(staShipment);
    }

    /**
     * 修改出厂单状态
     *
     * @param staShipment 出厂单状态
     * @return 结果
     */
    @Override
    public int updateStaShipment(StaShipment staShipment) {
        return staShipmentMapper.updateStaShipment(staShipment);
    }

    /**
     * 批量删除出厂单状态
     *
     * @param ids 需要删除的出厂单状态主键
     * @return 结果
     */
    @Override
    public int deleteStaShipmentByIds(Long[] ids) {
        return staShipmentMapper.deleteStaShipmentByIds(ids);
    }

    /**
     * 删除出厂单状态信息
     *
     * @param id 出厂单状态主键
     * @return 结果
     */
    @Override
    public int deleteStaShipmentById(Long id) {
        return staShipmentMapper.deleteStaShipmentById(id);
    }

    @Override
    public int deleteStaShipmentByState(StaShipment staShipment) {
        return staShipmentMapper.deleteStaShipmentByState(staShipment);
    }
}
